﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ProjectBase.Core.PersistenceSupport;
using ProjectBase.Core;

namespace SLSYJ.Core
{
    public class Year : PersistentObject
    {
        protected Year() { InitMembers(); }

        public Year(string name)
        {
            Check.Require(!String.IsNullOrEmpty(name), "name may not be null or empty");
            Name = name;
            InitMembers();
        }

        [DomainSignature]
        public virtual string Name { get; set; }

        public virtual IList<Month> Months { get; protected set; }

        private void InitMembers()
        {
            Months = new List<Month>();
        }

        protected override string GetDomainObjectSignature()
        {
            return Name;
        }
    }
}
